import {createRouter, createWebHashHistory} from 'vue-router';

const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: 'home',
        component: () => import( "@/views/home/Home"),
        meta: {
            index: 1
        }
    },
    {
        path: '/search',
        name: 'search',
        component: () => import('@/views/good/Search'),
        meta: {
            index: 2
        }
    },
    {
        path: '/product',
        name: 'product',
        component: () => import('@/views/good/ProductDetail'),
        meta: {
            index: 3
        }
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router;